<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use app\models\Supplier;

$all = Supplier::find()->where(['status'=>1])->all(); 
$supplier = yii\helpers\ArrayHelper::map($all, 'id', 'company');

?>

<div class="cruise-search">

    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
        'layout' => 'inline',
        'options' => ['data-pjax'=>true],
    ]); ?>

    <!-- ?= $form->field($model, 'id') ? -->

    <?php  echo $form->field($model, 'supplier_id')->dropdownList($supplier, ['prompt'=>'选择供应商']) ?>

    <?= $form->field($model, 'name')->textInput(['placeholder' => '邮轮名称']) ?>

    <?php  echo $form->field($model, 'status')->dropdownList(Yii::$app->params['status'], ['prompt'=>'选择状态']) ?>

    <?php // $form->field($model, 'from_city') ?>

    <?php // echo $form->field($model, 'weight') ?>

    <?php // echo $form->field($model, 'num') ?>

    <?php // echo $form->field($model, 'length') ?>

    <?php // echo $form->field($model, 'width') ?>

    <?php // echo $form->field($model, 'room') ?>

    <?php // echo $form->field($model, 'ceil') ?>

    <?php // echo $form->field($model, 'speed') ?>

    <?php // echo $form->field($model, 'first') ?>

    <?php // echo $form->field($model, 'desc') ?>


    <?php // echo $form->field($model, 'user_id') ?>

    <?php // echo $form->field($model, 'created_at') ?>

    <?php // echo $form->field($model, 'updated_at') ?>

    <div class="form-group">
        <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
